package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "category_", schema = "boot", catalog = "")
public class Category {//产品类别表
    private int categoryId;//类别id
    private String categoryName; //类别名称
    private Integer categoryIdt; //父级类别名称(自连接)
    private String categoryRank;//级别
    private Integer categorySc;//删除状态

    @Id
    @Column(name = "category_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(int categoryId) {
        this.categoryId = categoryId;
    }

    @Basic
    @Column(name = "category_name", nullable = true, length = 200)
    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    @Basic
    @Column(name = "category_idt", nullable = true)
    public Integer getCategoryIdt() {
        return categoryIdt;
    }

    public void setCategoryIdt(Integer categoryIdt) {
        this.categoryIdt = categoryIdt;
    }

    @Basic
    @Column(name = "category_rank", nullable = true, length = 200)
    public String getCategoryRank() {
        return categoryRank;
    }

    public void setCategoryRank(String categoryRank) {
        this.categoryRank = categoryRank;
    }

    @Basic
    @Column(name = "category_sc", nullable = true, length = 11)
    public Integer getCategorySc() {
        return categorySc;
    }

    public void setCategorySc(Integer categorySc) {
        this.categorySc = categorySc;
    }

    @Override
    public String toString() {
        return "Category{" +
                "categoryId=" + categoryId +
                ", categoryName='" + categoryName + '\'' +
                ", categoryIdt=" + categoryIdt +
                ", categoryRank='" + categoryRank + '\'' +
                ", categorySc=" + categorySc +
                '}';
    }
}
